/* OSD */

@import 'sass-utils';

$osd_levelbar_height:6px;

.osd-window {
  @extend %osd_panel;
  @extend %heading;
  text-align: center;
  font-weight: bold;
  spacing: $base_padding * 2;
  padding: $base_padding * 2 $base_padding * 3;
  & > * { spacing: $base_margin * 2; }
  margin-bottom: 4em;

  StIcon { icon-size: $large_icon_size;}

  StLabel {
    &:ltr { margin-right: $base_padding; }
    &:rtl { margin-left: $base_padding; }
  }

  .level {
    margin-bottom: $base_margin;
    &:first-child { margin-bottom: 0; }

    min-width: 160px;
    -barlevel-height: $osd_levelbar_height;
    -barlevel-background-color: transparentize($osd_fg_color, if($variant=='light', 0.7, 0.9));
    -barlevel-active-background-color: $osd_fg_color;
    // Yaru: Optimize overdrive color for contrast
    -barlevel-overdrive-color: optimize-contrast($osd_bg_color, $destructive_color, $target: 5.5);
    -barlevel-overdrive-separator-width: $base_padding * 0.5;
    &:ltr { margin-right: $base_padding; }
    &:rtl { margin-left: $base_padding; }
  }
}

// Monitor number label
.osd-monitor-label, .osd-break-countdown-label {
  background-color: -st-accent-color;
  color: -st-accent-fg-color;
  border-radius: $modal_radius;
  font-size: 3em;
  font-weight: bold;
  font-feature-settings: "tnum";
  margin: $base_margin * 3;
  padding: $base_padding * 2;
  text-align: center;
  min-width: 1.5em;
}

/* Pad OSD */
.pad-osd-window { // Yaru: Make pad OSD visible again in the light theme by using osd colors, should be ported to upstream
  padding: 32px;
  background-color: $osd_bg_color;
  color: $osd_fg_color;

  .button {
    @extend %button;
    &:insensitive { color: $fg_color; }
  }

  .pad-osd-title-box { spacing: 12px; }
  .pad-osd-title-menu-box { spacing: 6px; }
}

.combo-box-label {
  width: 15em;
}

.resize-popup {
  @extend %osd_panel;
}
